//localStorage.setItem(name, val);
//localStorage.getItem(name);
if(localStorage.getItem('visited')==null){
    localStorage.setItem('visited','true');
    localStorage.setItem('maincol','#ffffff');
    localStorage.setItem('hitokoto',false);
    localStorage.setItem('toc',true);
    localStorage.setItem('opacity',1);
    localStorage.setItem('mouse',false);
    localStorage.setItem('background',"false");
}
var maincol=localStorage.getItem('maincol');
var hitokoto=localStorage.getItem('hitokoto');
var toc=localStorage.getItem('toc');
var opacity=localStorage.getItem('opacity');
var mouse=localStorage.getItem('mouse');
var background=localStorage.getItem('background');
function updcol(col){
    $('.navbar-default').removeClass('head'+maincol);
    maincol=col;
    $('.navbar-default').addClass('head'+maincol);
    localStorage.setItem('maincol',col);
}
$(document).ready(function(){
    $(document).on('click', '.fold_hider', function(){
        $('>.fold', this.parentNode).slideToggle();
        $('>:first', this).toggleClass('Open');
    });
    $("div.fold").css("display","none");
    CURSOR = new Cursor();
    if(mouse!="true")CURSOR.close();
    updcol(maincol);
    $(".container .card").css('background-color',"rgba(252,252,252,"+opacity+")");
    $(".table-striped>tbody>tr:nth-of-type(odd)").css('background-color',"rgba(252,252,252,"+opacity+")");
    $(".panel-heading ").css('background-color',"rgba(252,252,252,"+Math.min(1.0,opacity+0.2)+")");
    if(background!='false')
    $('html').css('background',"url("+background+") 50% 50% / cover no-repeat fixed");
    $(function () { $("[data-toggle='popover']").popover(); });
});
